Present invention embodiments relate to deleting tuples in a database, and more specifically, to deleting tuples in a database column store when the database employs separate transaction identifier storage.
In a relational database, tables of data are stored in which data from one table may have some relationship with the data stored in another table. The relationships between the data in the various tables allow the processing of queries (e.g., database searches) in an orderly fashion.
When plural users or computer processes have access to the same database simultaneously (i.e., concurrently), issues may arise with respect to changing the existing data in the database. For example, if a database record is in the process of being created or modified, many database systems that do not provide concurrency control will “lock” that record for the duration of the update. Thus, in order to avoid the “locking” of individual or groups of records, multiple copies of the same record are permitted using multi-version concurrency control (MVCC) whereby multiple transactional changes to a database record are reconciled at some later point in time. However, when a database employs MVCC, multiple users or processes may change a record and multiple copies of the same record (with their corresponding changes) are stored until all changes are reconciled and committed.
Thus, in order to reconcile multiple changes to a given record, transaction identifiers (TIDs) are maintained for each copy or version of a record with actual or attempted record changes.
A version of a record is marked for removal, either due to deletion or update of the record, by modifying the TID associated with that record. The TIDs may be modified “in place”; the record is read, then modified, and stored anew, thereby undesirably increasing database input/output (I/O) volume. Furthermore, these TIDs cannot be compressed: the modified TID may not fit in the space allowed for the original TID. As a result, in many cases, the storage volume of the table data is actually smaller than the storage volume of the TIDs.